import * as fm from '../../apis/fm'

/**
 * 获取首页推荐广播
 * @see nowiki
 * @api http://fm.xinli001.com/broadcast?pk=99406937
 *
 * @param params
 * @param {string} params.pk [ string ] 广播ID
 *
 */
export function getRecommendFm(params: {
  pk: string
}) {
  return new Promise(async (resolve) => {
    await fm
      .getRecommendFm(params)
      .then((res) => {
        resolve(res)
      })
      .catch((err) => {
        resolve({
          code: 1001,
          message: err.message || '失败',
        })
      })
  })
}
